<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos  -->
			<title>File Source for Exception.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
											</head>
		<body>
						<h1>Source for file Exception.php</h1>
<p>Documentation is available at <a href="../default/_ays_application_Exceptions_Exception_php.html">Exception.php</a></p>
<div class="src-code">
<pre><ol><li><a name="a1"></a><span class="src-php">&lt;?php</span></li>
<li><a name="a2"></a><a href="../default/_ays_application_function_protectScript_php.html#functionprotectScript">protectScript</a><span class="src-sym">(</span><span class="src-str">'Exception.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a3"></a>&nbsp;</li>
<li><a name="a4"></a><span class="src-key">class </span><a href="../default/ExceptionExt.html">ExceptionExt</a> <span class="src-key">extends </span><span class="src-id">Exception</span><span class="src-sym">{</span></li>
<li><a name="a5"></a>    <span class="src-key">protected </span><a href="../default/ExceptionExt.html#var$_sTableName">$_sTableName</a> = <span class="src-str">'log'</span><span class="src-sym">;</span></li>
<li><a name="a6"></a>    <span class="src-key">protected </span><a href="../default/ExceptionExt.html#var$_sTablePrefix">$_sTablePrefix</a> = <span class="src-id">TABLE_PREFIX</span><span class="src-sym">;</span></li>
<li><a name="a7"></a>    <span class="src-key">protected </span><a href="../default/ExceptionExt.html#var$_asmData">$_asmData</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a8"></a>&nbsp;</li>
<li><a name="a9"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../default/ExceptionExt.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-var">$sMessage </span>= <span class="src-id">null</span><span class="src-sym">, </span><span class="src-var">$iCode </span>= <span class="src-id">null</span><span class="src-sym">, </span><span class="src-var">$asmData </span>= <span class="src-id">null</span><span class="src-sym">)</span><span class="src-sym">{</span></li>
<li><a name="a10"></a>        <span class="src-id">parent</span><span class="src-sym">::</span><span class="src-id">__construct</span><span class="src-sym">(</span><span class="src-var">$sMessage</span><span class="src-sym">, </span><span class="src-var">$iCode</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a11"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../default/ExceptionExt.html#var$_asmData">_asmData</a> = <span class="src-var">$asmData</span><span class="src-sym">;</span></li>
<li><a name="a12"></a>    <span class="src-sym">}</span></li>
<li><a name="a13"></a>&nbsp;</li>
<li><a name="a14"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../default/ExceptionExt.html#methodaddLog">addLog</a><span class="src-sym">(</span><span class="src-var">$sExceptionName</span><span class="src-sym">)</span><span class="src-sym">{</span></li>
<li><a name="a15"></a>        <span class="src-var">$oMysqliInstance </span>= <span class="src-key">new </span><span class="src-id"><a href="../default/AYSMysqli.html">AYSMysqli</a></span><span class="src-sym">(</span><span class="src-id"><a href="../default/_ays_config_config_php.html#defineBDD_HOST">BDD_HOST</a></span><span class="src-sym">, </span><span class="src-id"><a href="../default/_ays_config_config_php.html#defineBDD_USER">BDD_USER</a></span><span class="src-sym">, </span><span class="src-id"><a href="../default/_ays_config_config_php.html#defineBDD_PASS">BDD_PASS</a></span><span class="src-sym">, </span><span class="src-id"><a href="../default/_ays_config_config_php.html#defineBDD_DATABASE">BDD_DATABASE</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a16"></a>&nbsp;</li>
<li><a name="a17"></a>        <span class="src-var">$aisMessage </span>= <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a18"></a>                <span class="src-str">'IP' </span>=&gt; <span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'REMOTE_ADDR'</span><span class="src-sym">]</span><span class="src-sym">,</span></li>
<li><a name="a19"></a>                <span class="src-str">'UrlFrom' </span>=&gt; <span class="src-sym">@</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'HTTP_REFERER'</span><span class="src-sym">]</span><span class="src-sym">,</span></li>
<li><a name="a20"></a>                <span class="src-str">'Session' </span>=&gt; <span class="src-var">$_SESSION</span><span class="src-sym">,</span></li>
<li><a name="a21"></a>                <span class="src-str">'Data' </span>=&gt; <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../default/ExceptionExt.html#var$_asmData">_asmData</a><span class="src-sym">,</span></li>
<li><a name="a22"></a>                <span class="src-str">'POST' </span>=&gt; <span class="src-var">$_POST</span><span class="src-sym">,</span></li>
<li><a name="a23"></a>                <span class="src-str">'GET' </span>=&gt; <span class="src-var">$_GET</span></li>
<li><a name="a24"></a>        <span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a25"></a>&nbsp;</li>
<li><a name="a26"></a>        try<span class="src-sym">{</span></li>
<li><a name="a27"></a>            <span class="src-var">$oMysqliInstance</span><span class="src-sym">-&gt;</span><span class="src-id">query</span><span class="src-sym">(</span><span class="src-str">&quot;INSERT INTO &quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../default/ExceptionExt.html#var$_sTablePrefix">_sTablePrefix</a>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../default/ExceptionExt.html#var$_sTableName">_sTableName</a>.<span class="src-str">&quot; (date, type, text, level) &quot; </span>.</li>
<li><a name="a28"></a>                <span class="src-str">&quot;VALUES (NOW(), '&quot;</span>.<span class="src-var">$sExceptionName</span>.<span class="src-str">&quot;', '&quot;</span>.<span class="src-var">$oMysqliInstance</span><span class="src-sym">-&gt;</span><span class="src-id">escape_string</span><span class="src-sym">(</span><a href="http://www.php.net/serialize">serialize</a><span class="src-sym">(</span><span class="src-var">$aisMessage</span><span class="src-sym">))</span>.<span class="src-str">&quot;', &quot;</span>.<span class="src-id"><a href="../default/_ays_application_Exceptions_ExceptionsList_php.html#defineERROR">ERROR</a></span>.<span class="src-str">&quot;)&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a29"></a>        <span class="src-sym">}</span>catch<span class="src-sym">(</span><span class="src-id"><a href="../default/MysqliExecutionException.html">MysqliExecutionException</a> </span><span class="src-var">$oException</span><span class="src-sym">)</span><span class="src-sym">{</span></li>
<li><a name="a30"></a>            <span class="src-var">$oException</span><span class="src-sym">-&gt;</span><span class="src-id">addLog</span><span class="src-sym">(</span><span class="src-str">'MysqliExecution'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a31"></a>            <span class="src-var">$sMessage </span>= <span class="src-var">$oException</span><span class="src-sym">-&gt;</span><span class="src-id">getMessage</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a32"></a>            <span class="src-inc">include_once </span><span class="src-id"><a href="../default/_ays_config_config_php.html#defineVIEW_DIR">VIEW_DIR</a></span>.<span class="src-str">'/errors.php'</span><span class="src-sym">;</span></li>
<li><a name="a33"></a>        <span class="src-sym">}</span></li>
<li><a name="a34"></a>    <span class="src-sym">}</span></li>
<li><a name="a35"></a><span class="src-sym">}</span></li>
</ol></pre>
</div>
	<p class="notes" id="credit">
		Documentation generated on Sun, 30 Mar 2008 00:13:48 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</body>
</html>